package org.jeecg.modules.oms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.oms.entity.CfProfileWorkDetail;
import org.jeecg.modules.oms.mapper.CfProfileWorkDetailMapper;
import org.jeecg.modules.oms.service.ICfProfileWorkDetailService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 长风型材加工信息服务实现类
 */
@Slf4j
@Service
public class CfProfileWorkDetailServiceImpl extends ServiceImpl<CfProfileWorkDetailMapper, CfProfileWorkDetail> implements ICfProfileWorkDetailService {

    @Override
    public boolean deleteByOrderId(String orderId) {
        LambdaQueryWrapper<CfProfileWorkDetail> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CfProfileWorkDetail::getOrderId, orderId);
        return this.remove(wrapper);
    }

    @Override
    public List<CfProfileWorkDetail> getByProfileId(String profileId) {
        LambdaQueryWrapper<CfProfileWorkDetail> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CfProfileWorkDetail::getProfileId, profileId);
        return this.list(wrapper);
    }

    @Override
    public List<CfProfileWorkDetail> getByCutId(String cutId) {
        LambdaQueryWrapper<CfProfileWorkDetail> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CfProfileWorkDetail::getCutId, cutId);
        return this.list(wrapper);
    }

    @Override
    public List<CfProfileWorkDetail> getByOrderId(String orderId) {
        LambdaQueryWrapper<CfProfileWorkDetail> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(CfProfileWorkDetail::getOrderId, orderId);
        return this.list(wrapper);
    }
} 